using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Ui_Rotate : MonoBehaviour
{
    private Player_BuffTurnOn Player_BuffTurnOn;

    // Start is called before the first frame update
    void Start()
    {
        Player_BuffTurnOn = GameObject.Find("BUFF").GetComponent<Player_BuffTurnOn>();
    }

    // Update is called once per frame
    void Update()
    {
        rotate();
    }

    void rotate()
    {
        if(Player_BuffTurnOn.time >= 0)
        {
            Player_BuffTurnOn.time -= Time.deltaTime;
            transform.Rotate(Vector3.up * 240 * Time.deltaTime, Space.World);
        }

    }
}
